package com.xiaopeng.system.test.service;

import com.xiaopeng.system.test.model.TestReqDTO;
import com.xiaopeng.common.page.PageVO;
import com.xiaopeng.system.test.model.DemoExcelVO;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DemoService {


    public List<DemoExcelVO> selectList(TestReqDTO testVO) {
        List<DemoExcelVO> list = new ArrayList<>();
        DemoExcelVO demoExcelVO1 = new DemoExcelVO();
        demoExcelVO1.setType(4);
        list.add(demoExcelVO1);

        DemoExcelVO demoExcelVO2 = new DemoExcelVO();
        demoExcelVO2.setType(5);
        list.add(demoExcelVO2);

        DemoExcelVO demoExcelVO3= new DemoExcelVO();
        demoExcelVO3.setType(6);
        list.add(demoExcelVO3);

        return list;
    }


    public PageVO<DemoExcelVO> selectPage(TestReqDTO testVO) {
        PageVO<DemoExcelVO> page = new PageVO<>();
        page.setRoot(selectList(testVO));
        page.setTotalPages(1);
        page.setTotalRows(5L);
        return page;
    }


}
